package com.buss.core.controller;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import com.buss.core.utils.StringUtil;
import com.buss.core.validator.ResultMessage;

/**
 * 汉子转换拼音快捷码
 * @author Administrator
 *
 */
@Controller
@RequestMapping("/core")
public class HanziToPinyinAction extends BaseController {

	@RequestMapping("/hanzitopinyin")
	@ResponseBody
	public Map<String,Object> getPinyin(String hanzi){
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("pinyin", StringUtil.getChineseFirstAlpha(hanzi));
		map.put("pinyinfull", StringUtil.getChineseFullSpell(hanzi));
		map.put("message", new ResultMessage("0", "汉子转换拼音成功!"));
		return map;
	}
	
	@Override
	public ModelAndView listPage(String menuid) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public ModelAndView editPage(String type, Long id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Map<String, Object> delete(Long[] ids) {
		// TODO Auto-generated method stub
		return null;
	}

}
